<?php

class TagModel extends MY_Model{
    public $table = 't_tag';
    public function __construct(){
        parent::__construct();
    }

    /**
     * 取出所有的二级标签列表
     * name: getTagList
     * @return array
     * @throws Exception
     * @Author:taiyang
     */
    public function getTagList($like=''){
        $sql="select id,title from ".$this->table." where 1 and level=2 and status =1 ";
        if(!empty($like)){
            $sql.=" and title like '%".$like."%'";
        }
        $sql.=" order by id asc ";
        return $this->query_sql_list($sql);
    }

}